<template>
  <page-body>
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center visitor_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub visitor_fd0_0'>
          <view class='flex flex-wrap align-center visitor_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  visitor_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='visitor_fd0_0_c1_c0'>访客</text>
          </view>
          <view class='flex flex-wrap align-center justify-end visitor_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction align-stretch benben-flex-layout visitor_flex_1">
        <view class='flex align-center visitor_fd1_0' v-for="(item,index) in dataList" :key="index"
          @tap.stop="handleJumpDiy" data-type="navigateTo"
          :data-url="`/pages/grzx/userhome/userhome?aid=${item.user_id}`">
          <image class='visitor_fd1_0_c0' mode="aspectFit" :src='item.user_avatar'></image>
          <view class='flex flex-direction align-stretch flex-sub'>
            <text class='visitor_fd1_0_c1_c0'>{{item.user_nickname}}</text>
            <view class='flex flex-wrap align-center visitor_fd1_0_c1_c1'>
              <view class='flex flex-wrap align-center'>
                <text>id:</text>
                <text>{{item.caozuorenID}}</text>
              </view>

              <view class='flex  visitor_fd1_0_c1_c1_c1'></view>

              <!-- <view class='flex flex-wrap align-center'>
                <image class='visitor_fd1_0_c1_c1_c2_c0' mode="aspectFit" :src='STATIC_URL+"160.png"'></image>
                <text class='visitor_fd1_0_c1_c1_c2_c1'>北京市</text>
              </view> -->
            </view>
          </view>
          <button class='visitor_fd1_0_c2' v-if="item.is_follow==1" @click.stop="collect(item)">已关注</button>
          <button class='visitor_fd1_0_c3' v-if="item.is_follow==0" @click.stop="collect(item)">关注</button>
          <button class='visitor_fd1_0_c4' v-if="item.is_follow==2" @click.stop="collect(item)">互相关注</button>
        </view>
        <fu-empty style="background-color: #FFFFFF;height:100vh" :pagingListLoadedAll="pagingListLoadedAll"
          :pagingListNoListData="pagingListNoListData" :listDataLength="listDataLength"
          :isLoadInit="isLoadInit"></fu-empty>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </page-body>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'
  import pagingList from '@/common/mixin/paging_list.js';
  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "keywords": "",
        "dataList": [],
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {
      let {
        user_id
      } = options
      if (user_id !== undefined) this.user_id = user_id
      this.getih4145c1253b3eFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.getListFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      // post669b1d0232445
      collect(item) {
        this.$api.post(global.apiUrls.post669b1d0232445, {
          user_id: item.caozuorenID
        }).then(res => {
          if (res.data.code == 1) {
            this.getih4145c1253b3eFunc()
          } else {
            this.$message.info(res.data.msg)
          }
        })
      },
      //用户管理-足迹列表
      async getih4145c1253b3eFunc() {
        //请求方法
        //数据验证
        this.minixPagingListsApi = global.apiUrls.post669b1973c2275;
        this.pageingListApiMethod = 'post';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          freetransactionclassification_id: this.curent
        }
        this.listData = [];
        this.dataList = this.listData;
        this.pagingListToggle();
      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .visitor_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .visitor_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .visitor_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .visitor_fd0_0_c0 {
    width: 120rpx;
  }

  .visitor_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .visitor_flex_1 {
    background: var(--benbenbgColor1);
    padding: 0rpx 24rpx 0rpx 24rpx;
    background-size: 100% auto !important;
  }

  .visitor_fd1_0_c4 {
    background: linear-gradient(180deg, #176BE8 0%, #5A5CFC 100%);
    ;
    border-radius: 29rpx 29rpx 29rpx 29rpx;
    width: 144rpx;
    line-height: 60rpx;
    font-size: 24rpx;
    color: #fff;
    height: 60rpx;
  }

  .visitor_fd1_0_c3 {
    background: linear-gradient(180deg, #176BE8 0%, #5A5CFC 100%);
    border-radius: 29rpx 29rpx 29rpx 29rpx;
    width: 144rpx;
    line-height: 56rpx;
    font-size: 24rpx;
    color: #fff;
    height: 56rpx;
  }

  .visitor_fd1_0_c2 {
    border: 1px solid #176BE8;
    background: #FFFFFF;
    border-radius: 29rpx 29rpx 29rpx 29rpx;
    width: 144rpx;
    line-height: 56rpx;
    font-size: 24rpx;
    color: rgba(23, 107, 232, 1);
    height: 56rpx;
  }

  .visitor_fd1_0_c1_c1_c2_c1 {
    margin: 0rpx 0rpx 0rpx 16rpx;
  }

  .visitor_fd1_0_c1_c1_c2_c0 {
    width: 24rpx;
    height: 24rpx;
  }

  .visitor_fd1_0_c1_c1_c1 {
    background: var(--benbenbgColor6);
    width: 1rpx;
    height: 30rpx;
    margin: 0rpx 10rpx 0rpx 10rpx;
    transform: scaleX(0.5);
  }

  .visitor_fd1_0_c1_c1 {
    color: #999999;
    font-size: 24rpx;
    line-height: 33rpx;
    font-weight: 400;
  }

  .visitor_fd1_0_c1_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 500;
    line-height: 40rpx;
    margin: 0rpx 0rpx 16rpx 0rpx;
  }

  .visitor_fd1_0_c0 {
    width: 96rpx;
    height: 96rpx;
    border-radius: 48rpx 48rpx 48rpx 48rpx;
    margin: 0rpx 16rpx 0rpx 0rpx;
  }

  .visitor_fd1_0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }
</style>
